package com.lizhangjun.nim.push;

import com.lizhangjun.nim.constant.ImConstant;
import com.lizhangjun.nim.toolkit.RocketMQProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * rocket mq消息推送
 */
@Component
public class RocketPublish extends AbstractPublish {

    @Autowired
    private RocketMQProducer rocketMQProducer;

    @Override
    public void push(String data) {
        rocketMQProducer.sendAsyncMsg(ImConstant.TOPIC_IM, ImConstant.TAG_CHAT, data);
    }
}
